package com.igeek.controller;


import com.igeek.model.claims.InsuranceFlowable1;
import com.igeek.result.Result;
import com.igeek.service.IInsuranceFlowable1Service;
import com.igeek.vo.process.ResultDto;
import org.flowable.engine.HistoryService;
import org.flowable.engine.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-08-19
 */
@RestController
@RequestMapping("/insurance-flowable1")
public class InsuranceFlowable1Controller {
    @Autowired
    private HistoryService historyService;
    @Autowired
    private TaskService taskService;

    @Autowired
    private IInsuranceFlowable1Service iInsuranceFlowable1Service;

    //查询待办
  @GetMapping("getAll")
    public Result getAll() {
      List<InsuranceFlowable1> list=iInsuranceFlowable1Service.list();
      return Result.ok(list);
  }

  //同意审批
    @PostMapping("agree/{id}")
    public Result agree(@PathVariable("id") Integer id, @RequestBody ResultDto resultDto){
      iInsuranceFlowable1Service.agree(id,resultDto);
        return Result.ok();
    }






}
